package jadetest;

import java.util.LinkedList;

public class Container extends Thread
{
	// This class has been created to simplify the use of Jade in Eclipse for the AIA Lab. 
	// It is an alternative to the following command-line commands:
    //
	//     java jade.Boot -container -gui [options] [Agent list]  --> Container + GUI + Agents initialization

	private String[] agent;

	public Container(String... agent)
	{
		this.agent = agent;
	}
	
	public void run()
	{
		LinkedList<String>	ll;
		int					i;
		
		ll = new LinkedList<String>();
		ll.add("-container");
		ll.add("-gui");
		for(i=0;i<agent.length;i++)
		{
			ll.add(agent[i]);
		}
		jade.Boot.main(ll.toArray(new String[0]));
	}
}
